#version 330 core
layout(location = 0) in vec3 vertexPosition;
layout(location = 1) in vec2 vertexUV;
layout(location = 2) in vec3 vertexNormal;

out vec2 UV;
out vec3 vertexPosition; //in worldspace
out vec3 vertexNormal; //in worldspace


uniform mat4 modelViewProjection;
uniform mat4 model;
uniform mat4 modelNormal;

void main() {
	gl_Position = modelViewProjection * vec4(vertexPosition,1);
	vertexPosition = (model * vec4(vertexPosition,1)).xyz;
	UV=vertexUV;
	vertexNormal=modelNormal * vertexNormal;
}